package org.example.DesignPatterns.Flyweight;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 15:02
 **/
public class Client {

    public static void main(String[] args) {
        Factory factory=new RiverFactory();
        factory.create("River").draw(10,20);
        factory.create("River").draw(20,20);
        factory.create("River").draw(30,20);
        factory.create("River").draw(40,20);
        factory.create("River").draw(50,20);
        factory.create("River").draw(60,20);

        factory=new GrassFactory();
        factory.create("Grass").draw(10,30);
        factory.create("Grass").draw(20,30);

        factory=new HouseFactory();
        factory.create("House").draw(10,10);



    }
}